Xbasic

UNQUOTE2 Function

Syntax

Output_String as C = Unquote2(C Source)

Arguments

SourceCharacter

A character string that contains quotation marks.

Description

Removes wrapping quotes and converts escaped quotes to simple quotes.

Discussion

Removes one level of quotation marks, but never removes the last level, which is necessary for character string data. UNQUOTE2() is a replacement for the UNQUOTE() function. UNQUOTE2() removes one level of quotation marks, but never removes the last level, which is necessary for character string data.

Example

dim str as c
str = "Hello"

str = quote(str)
? str
= "Hello"

str = quote(str)
? str
= "\"Hello\""

? unquote2(str)
= "Hello"

See Also